package org.darkforest.common.services;

import org.darkforest.model.*;
import org.darkforest.vo.MemberBase;
import org.springframework.web.servlet.ModelAndView;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created by valentina on 15/1/18.
 * 商户基本信息操作
 */
public interface RefundReturnService {
    public void selectListByCondition(RefundReturnSearchBean page);
    public RefundReturn getRefundReturnById(int id);
    public int updateRefundReturn(RefundReturn refund);
    public int updateRebackReturn(RefundReturn refund);

    /**
     * 微信提交退款申请
     * @param reason
     * @param memberId
     * @param orderId  @return
     * @param goodsId
     * @param reasonId
     */
    int addWxRefundReturn(String reason, Integer memberId, Integer orderId, String[] goodsId, Integer reasonId);


    /**
     * 根据订单号修改退款状态
     * @param refund
     */
    int updateRefundByOderSn(RefundReturn refund);

    Map<String,Object> refundMoneyAndGoodsStatistics(int flag, Integer storeId);

    int refundForPdAmount(RefundReturn refund,BigDecimal refundAmount, Member leader,Member buyer);

    /****
     * 退款操作
     * @param newfund
     * @return
     */
    public String refundDo(RefundReturn newfund);

    public void refundReturnSuccessUpdate(OrderPay pay);

    /**
     * 退款统计查询
     * @param page
     * @return
     */
    List<Map<String,Object>> findRefundStatisticsByCondition(RefundReturnSearchBean page);

    /***
     * 前端取消订单
     * @param vo
     * @return
     */
    PdLog cancelOrder(OrderVo vo);

    /***
     * 前端取消礼品码订单
     * @param vo
     * @return
     */
    String cancelGiftCodeOrder(OrderVo vo);
}
